// 获取命令行参数：node encodeBuffer.js <username> <password>
const [username, password] = process.argv.slice(2);

if (!username || !password) {
  console.log("用法: node encodeBuffer.js <username> <password>");
  process.exit(1);
}

console.log(`用户名:${username}  密码:${password}`);

const source = `${username}:${password}`;
const base64 = Buffer.from(source, "utf8").toString("base64");

console.log(`base64加密：${base64}`);


